package com.mode.strategy.pattern;

/**
 * @Description:
 * @Author: zyf
 * @Time: 2020/9/27 17:41
 */
public class Context {

    private Strategy strategy;

    public Context(Strategy strategy){
        this.strategy = strategy;
    }
    public void executeStrategy(int num1,int num2){
        int calc = this.strategy.calc(num1, num2);
        System.out.printf("reslut:"+calc);
    }
}
